home *** CD-ROM | disk | FTP | other *** search
- /*----------------------------------------------------------------------------
-
- open.c
-
- This module handles the "Open" command.
-
- Copyright © 1994-1995, Northwestern University.
-
- ----------------------------------------------------------------------------*/
-
- #include "glob.h"
- #include "open.h"
- #include "sfutil.h"
- #include "newsrc.h"
- #include "message.h"
- #include "fileutil.h"
-
-
-
- /*----------------------------------------------------------------------------
- DoOpen
-
- Handle the "Open" command.
-
- Exit: function result = error code.
- ----------------------------------------------------------------------------*/
-
- OSErr DoOpen (void)
- {
- StandardFileReply reply;
- WindowPtr wind;
-
- MyStandardGetFile(nil, kNumOpenTypeList, kOpenTypeList, &reply,
- gPrefs.savedUGLDefaultFolder ? gPrefs.savedUGLDefaultFolderAlias : nil);
- if (!reply.sfGood) {
- return userCanceledErr;
- } else if (reply.sfType == kSavedUserGroupListFileType) {
- return OpenUserGroupListFile(&reply.sfFile);
- } else {
- return OpenMessageFile(&reply.sfFile, &wind);
- }
- }
-